//
//  AppDelegate+LocationHelper.m
//  LXLocationRelated
//
//  Created by Livespro on 2017/10/22.
//  Copyright © 2017年 Livesxu. All rights reserved.
//

#import "AppDelegate+LocationHelper.h"
#import "LXLocationAwaken.h"
#import "LXLocationAction.h"
#import "LXMotionAction.h"

@implementation AppDelegate (LocationHelper)

- (void)locationToAppAwakenLaunchingWithOptions:(NSDictionary *)launchOptions;{
    
    [LXLocationAction shareLocation];
    [LXMotionAction shareMotion];
    [[LXLocationAwaken shareLocation] startUpdating];
    
    if ([launchOptions objectForKey:UIApplicationLaunchOptionsLocationKey]) {
    
        if ([CLLocationManager significantLocationChangeMonitoringAvailable]) {
           
            [[LXLocationAwaken shareLocation].locationM startMonitoringSignificantLocationChanges];
        }
    }
    
//    NSArray *docPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
//    NSString *path = [docPath objectAtIndex:0];
}

@end
